package Utility;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JTextField;

public class BillLine {
	int lineId;
	int billId;
	int customerId;
	int personnelId;
	Promotion promotion;
	float billTotalCost=0;
	float specialPrice;
	String billDate;
	String customerCode;
	int productId;
	float cash;
	float credit;
	JLabel customerLabel;
	int amount;
	float payedCash=0;
	CustomCheckBox creditCheckBox;
	CustomCheckBox cashCheckBox;
	JTextField creditCashTextField;
	JTextField amountTextField;
	JTextField promotionTextField;
	JTextField totalPromotionTextField;
	JTextField priceTextField;
	JTextField sumTextField;
	boolean billLineReady=false;
	boolean creditCheckBoxStatus=false;
	boolean cashCheckBoxStatus=false;
	boolean creditCashTextFieldStatus=false;
	boolean suitability=false;
	int promotionAmount=0;
	CustomComboBox productComboBox;
	JButton saveButton,editButton,deleteButton,plusButton,minusButton;
	int modifyingPromotionUnit=0,modifyingPromotionAmount=0;
	
	public  BillLine(int id){
		this.lineId=id;
		this.customerLabel=new JLabel();
		this.creditCheckBox=new CustomCheckBox(id);
		this.cashCheckBox=new CustomCheckBox(id);
		this.productComboBox=new CustomComboBox(id);
		this.amountTextField=new JTextField();
		this.promotionTextField=new JTextField();
		this.totalPromotionTextField=new JTextField();
		this.sumTextField=new JTextField();
		this.priceTextField=new JTextField();
		this.saveButton= new JButton();
		this.editButton= new JButton();
		this.deleteButton= new JButton();
		this.plusButton= new JButton();
		this.minusButton= new JButton();
		this.cashCheckBoxStatus=false;
		this.creditCheckBoxStatus=false;
		this.creditCashTextFieldStatus=false;
		this.amount=0;
		this.specialPrice=0;
		this.suitability=true;
		Promotion promotion=new Promotion();
	    promotion.setPromotionId(-1);
	    promotion.setPromotionProductId(-1);
	    promotion.setPromotionCustomerId(-1);
	    this.setBillPromotion(promotion);
	    this.promotionAmount=0;
	    this.cash=0;
	    this.credit=0;
	    }
	
	public void setBillId(int billId){
		this.billId=billId;
	}
	
	public int getBillId(){
		return this.billId;
	}
	
	public int getbillLineid(){
		return this.lineId;
	}
	
	public void setCustomerId(int customerId){
		this.customerId=customerId;
	}
	
	public int getCustomerId(){
		return this.customerId;
	}
	
	public void setPersonnelId(int personnelId){
		this.personnelId=personnelId;
	}
	
	public int getPersonnelId(){
		return this.personnelId;
	}
	
	
	public void setBillDate(String billDate){
		this.billDate=billDate;
	}
	
	public String getBillDate(){
		return this.billDate;
	}
	
	public void setProductId(int productId){
		this.productId=productId;
	}
	
	public int getProductId(){
		return this.productId;
	}
	
	public void setCashCheckBox(CustomCheckBox cashCheckBox ){
		this.cashCheckBox=cashCheckBox;
	}
	
	public CustomCheckBox getCashCheckBox(){
		return this.cashCheckBox;
	}
	
	public void setCreditCheckBox(CustomCheckBox creditCheckBox ){
		this.creditCheckBox=creditCheckBox;
	}
	
	public CustomCheckBox getCreditCheckBox(){
		return this.creditCheckBox;
	}
	
	public void setCreditCashTextField(JTextField creditCashCheckBox ){
		this.creditCashTextField=creditCashCheckBox;
	}
	
	public JTextField getCreditCashTextField(){
		return this.creditCashTextField;
	}
	
	public void setBillLineReady(boolean billLineReady){
		this.billLineReady=billLineReady;
	}
	
	public boolean getBillLineReady(){
		return this.billLineReady;
	}
	
	public void setCustomerLabel(JLabel customerLabel){
		this.customerLabel=customerLabel;
	}
	
	public JLabel getCustomerLabel(){
		return this.customerLabel;
	}
	
	public void setSpecialPrice(float specialPrice){
		this.specialPrice=specialPrice;
	}
	
	public float getSpecialPrice(){
		return this.specialPrice;
	}
	
	public void setCreditCheckBoxStatus(boolean creditCheckBoxStatus){
		this.creditCheckBoxStatus=creditCheckBoxStatus;
	}
	
	public boolean getCreditCheckBoxStatus(){
		return this.creditCheckBoxStatus;
	}
	
	
	public void setCashCheckBoxStatus(boolean cashCheckBoxStatus){
		this.cashCheckBoxStatus=cashCheckBoxStatus;
	}
	
	public boolean getCashCheckBoxStatus(){
		return this.cashCheckBoxStatus;
	}
	
	public void setCreditCashTextFieldStatus(boolean creditCashTextFieldStatus){
		this.creditCashTextFieldStatus=creditCashTextFieldStatus;
	}
	
	public boolean getCreditCashTextFieldStatus(){
		return this.creditCashTextFieldStatus;
	}
	
	public void setAmount(int amount){
		this.amount=amount;
	}
	
	public int getAmount(){
		return this.amount;
	}
	
	public void setBillModifyingPromotionAmount(int modifyingPromotionAmount){
		this.modifyingPromotionAmount=modifyingPromotionAmount;
	}
	
	public int getBillModifyingPromotionAmount(){
		return this.modifyingPromotionAmount;
	}
	
	public void setBillModifyingPromotionUnit(int modifyingPromotionUnit){
		this.modifyingPromotionUnit=modifyingPromotionUnit;
	}
	
	public int getBillModifyingPromotionUnit(){
		return this.modifyingPromotionUnit;
	}
	
	public void setBillTotalCost(float billTotalCost){
		this.billTotalCost=billTotalCost;
	}
	
	public float getBillTotalCost(){
		return this.billTotalCost;
	}
	
	public void setPayedCash(float payedCash){
		this.payedCash=payedCash;
	}
	
	public float getPayedCash(){
		return this.payedCash;
	}
	
	public void setCustomerCode(String customerCode){
		this.customerCode=customerCode;
	}
	
	public String getCustomerCode(){
		return this.customerCode;
	}
	
	public void setBillSuitability(boolean suitability){
		this.suitability=suitability;
	}
	
	public boolean getBillSuitability(){
		return this.suitability;
	}
	
	public void setBillPromotion(Promotion promotion){
		this.promotion=promotion;
	}
	
	public Promotion getBillPromotion(){
		return this.promotion;
	}
	
	
	public void setBillPromotionUnit(int promotionUnit){
		this.promotion.setPromotionUnit(promotionUnit);
	}
	
	public int getBillPromotionUnit(){
		return this.promotion.getPromotionUnit();
	}
	
	public void setBillPromotionAmount(int promotionAmount){
		this.promotionAmount=promotionAmount;
	}
	
	public int getBillPromotionAmount(){
		return this.promotionAmount;
	}
	
	public void setBillProductComboBox(CustomComboBox productComboBox){
		this.productComboBox=productComboBox;
	}
	
	public CustomComboBox getBillProductComboBox(){
		return this.productComboBox;
	}
	
	public void setAmountTextField(JTextField amountTextField){
		this.amountTextField=amountTextField;
	}
	
	public JTextField getAmountTextField(){
		return this.amountTextField;
	}
	
	public void setPromotionTextField(JTextField promotionTextField){
		this.promotionTextField=promotionTextField;
	}
	
	public JTextField getPromotionTextField(){
		return this.promotionTextField;
	}
	
	public void setSumTextField(JTextField sumTextField){
		this.sumTextField=sumTextField;
	}
	
	public JTextField getSumTextField(){
		return this.sumTextField;
	}
	
	public void setTotalPromotionTextField(JTextField totalPromotionTextField){
		this.totalPromotionTextField=totalPromotionTextField;
	}
	
	public JTextField getTotalPromotionTextField(){
		return this.totalPromotionTextField;
	}
	
	public void setPriceTextField(JTextField priceTextField){
		this.priceTextField=priceTextField;
	}
	
	public JTextField getPriceTextField(){
		return this.priceTextField;
	}
	
	public void setSaveButton(JButton saveButton){
		this.saveButton=saveButton;
	}
	
	public JButton getSaveButton(){
		return this.saveButton;
	}
	
	public void setEditButton(JButton editButton){
		this.editButton=editButton;
	}
	
	public JButton getEditButton(){
		return this.editButton;
	}
	
	public void setDeleteButton(JButton deleteButton){
		this.deleteButton=deleteButton;
	}
	
	public JButton getDeleteButton(){
		return this.deleteButton;
	}
	
	public void setPlusButton(JButton plusButton){
		this.plusButton=plusButton;
	}
	
	public JButton getPlusButton(){
		return this.plusButton;
	}
	
	public void setMinusButton(JButton minusButton){
		this.minusButton=minusButton;
	}
	
	public JButton getMinusButton(){
		return this.minusButton;
	}
	
	public void setBillCash(float cash){
		this.cash=cash;
	}
	
	public float getBillCash(){
		return this.cash;
	}
	
	public void setBillCredit(float credit){
		this.credit=credit;
	}
	
	public float getBillCredit(){
		return this.credit;
	}
	
	
	
	
	
	
	
}
